import request from '@/utils/request'

// 法律文档搜索
export const searchLegalDocument = (params) => {
  return request({
    url: '/search/legalDocument',
    method: 'get',
    params
  })
}

// 获取搜索历史
export const getSearchHistory = () => {
  return request({
    url: '/searchHistory/list',
    method: 'get'
  })
}

// 添加搜索历史
export const addSearchHistory = (query) => {
  return request({
    url: '/searchHistory/add',
    method: 'post',
    params: {
      query: query
    }
  })
}
